﻿@model List<FlashCards.WebApp.Models.FlashcardSetModel>
@{
    ViewBag.Title = "ShowCategory";
}
<h2>
    ShowCategory</h2>
@if (Model != null && Model.Count > 0)
{
    <table>
        <tr>
            <th>Name</th>
            <th>Tags</th>
            <th></th>
        </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(x => item.Name)
            </td>
            <td>
                @Html.DisplayFor(x => item.Tags)
            </td>
            <td>
                @Html.ActionLink("repeat", "RepeatFlashcardSet", "Flashcards", new { flashcardSetId = item.Id, userId = ViewBag.UserId }, null)
            </td>
        </tr>
    }
    </table>
}
else
{
    <p>Category is empty!</p> 
}